{extend name="../../base/view/common/base" /}
<!-- 主体 -->
{block name="body"}
<div class="layui-form p-page">
	<h3 class="pb-3">报销详情</h3>
	<table class="layui-table layui-table-form">
		<tr>
			<td class="layui-td-gray">凭证编号</td>
			<td>{$detail.code}</td>
			<td class="layui-td-gray">入账月份</td>
			<td>{$detail.income_month}</td>
			<td class="layui-td-gray-2">原始单据日期</td>
			<td>{$detail.expense_time}</td>
		</tr>
		<tr>
			<td class="layui-td-gray">报销主体</td>
			<td colspan="5">{$detail.subject_name|default='-'}</td>
		</tr>
		{if condition="$detail.project_id > 0"}
		<tr>
			<td class="layui-td-gray">关联项目</td>
			<td colspan="5">{$detail.ptname}</td>
		</tr>
		{/if}
		<tr>
			<td class="layui-td-gray">报销员工</td>
			<td>{$detail.admin_name}</td>
			<td class="layui-td-gray">报销部门</td>
			<td>{$detail.department}</td>
			<td class="layui-td-gray">报销总费用(元)</td>
			<td><span style="color:#1E9FFF">{$detail.cost}</span></td>
		</tr>
		<tr>
			<td class="layui-td-gray">报销选项</td>
			<td colspan="5">	
				<table class="layui-table layui-table-min" style="margin:0">
					<tr>
						<th width="100">报销金额(元)</th>
						<th width="150">报销类别</th>
						<th>备注信息</th>
					</tr>
					{volist name="$detail.list" id="vo"}
					<tr>
						<td>{$vo.amount}</td>
						<td>{$vo.cate_title}</td>
						<td style="text-align:left">{$vo.remarks}</td>
					</tr>
					{/volist}
				</table>
			</td>
		</tr>
		{notempty name="$detail.file_ids"}
		<tr>
			<td class="layui-td-gray">相关附件</td>
			<td colspan="5">
				<div class="layui-row">
					{volist name="$detail.file_array" id="vo"}
					<div class="layui-col-md4" id="uploadFile{$vo.id}">{:file_card($vo,'view')}</div>
					{/volist}
				</div>
			</td>
		</tr>
		{/notempty}
		{if ( $detail.check_status eq 2)}
			{if ( $detail.pay_status eq 1)}
				<tr>
					<td class="layui-td-gray">打款状态</td>
					<td><span class="yellow">已打款</span></td>
					<td class="layui-td-gray">打款人</td>
					<td>{$detail.pay_admin}</td>
					<td class="layui-td-gray">打款时间</td>
					<td>{$detail.pay_time}</td>
				</tr>
			{else/}
				<tr>
					<td class="layui-td-gray">打款状态</td>
					<td><span class="red">未打款</span></td>
					<td class="layui-td-gray">打款人</td>
					<td>-</td>
					<td class="layui-td-gray">打款时间</td>
					<td>-</td>
				</tr>
			{/if}
		{/if}
	</table>	

	<div id="checkBox" class="pt-3" data-status="{$detail.check_status}" data-id="{$detail.id}" data-checkflowid="{$detail.check_flow_id}"></div>
</div>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
<script>
const moduleInit = ['tool','oaCheck'];
function gouguInit() {
	var form = layui.form,tool=layui.tool, oaCheck=layui.oaCheck;	
	oaCheck.init({
		check_name:'expense'
	});
}
</script>
{/block}
<!-- /脚本 -->